gtk4.git
5 years agolistview: Set accessible roles
Matthias Clasen [Thu, 15 Oct 2020 03:34:51 +0000 (23:34 -0400)]
listview: Set accessible roles

Use the LIST and LIST_ITEM roles for GtkListView
and its children. Use the GRID and GRID_CELL roles
for GtkGridView and its children.

5 years agoDocument accessible roles for stacks and notebooks
Matthias Clasen [Thu, 15 Oct 2020 02:27:09 +0000 (22:27 -0400)]
Document accessible roles for stacks and notebooks

This was forgotten when I implemented the Tabs pattern.

5 years agoflowbox: Set accessible roles
Matthias Clasen [Thu, 15 Oct 2020 02:18:31 +0000 (22:18 -0400)]
flowbox: Set accessible roles

Use the GRID and GRID_CELL roles for GtkFlowBox
and GtkFlowBoxChild.

5 years agolistbox: Set accessible roles
Matthias Clasen [Thu, 15 Oct 2020 02:16:00 +0000 (22:16 -0400)]
listbox: Set accessible roles

Use the LIST and LIST_ITEM roles for GtkListBox
and GtkListBoxRow.

5 years agoatspi: Add some docs
Matthias Clasen [Thu, 15 Oct 2020 01:02:02 +0000 (21:02 -0400)]
atspi: Add some docs

Add a comment that explains a few of the more subtle
points of the Atspi context tree contstruction.

5 years agoatspi: Implement Selection for notebook tabs
Matthias Clasen [Thu, 15 Oct 2020 00:52:33 +0000 (20:52 -0400)]
atspi: Implement Selection for notebook tabs

This is a bit different from the way things were done
in GTK 3 - we follow what was done for GtkStackSwitcher,
and make the tab bar carry the GTK_ACCESSIBLE_TAB_LIST
role, and implement Selection there.

5 years agonotebook: Set accessible roles and properties
Matthias Clasen [Wed, 14 Oct 2020 23:06:46 +0000 (19:06 -0400)]
notebook: Set accessible roles and properties

Set up the necessary roles, relations and properties
for the tab patterns. This parallels what we have done
for GtkStackSwitcher, and implements the Tabs pattern
as described in the ARIA authoring guidelines.

5 years agoatspi: Don't crash on unnamed stack pages
Matthias Clasen [Wed, 14 Oct 2020 23:05:36 +0000 (19:05 -0400)]
atspi: Don't crash on unnamed stack pages

GtkNotebook creates unnamed stack pages, and we should
not crash when that happens.

5 years agogizmo: Add a way to set accessible role
Matthias Clasen [Wed, 14 Oct 2020 22:37:14 +0000 (18:37 -0400)]
gizmo: Add a way to set accessible role

This will be used for some of the gizmo used
inside GtkNotebook.

5 years agoatspi: Implement Selection for GtkStackSwitcher
Matthias Clasen [Wed, 14 Oct 2020 05:06:04 +0000 (01:06 -0400)]
atspi: Implement Selection for GtkStackSwitcher

5 years agostackswitcher: Set up relations and states
Matthias Clasen [Wed, 14 Oct 2020 04:25:57 +0000 (00:25 -0400)]
stackswitcher: Set up relations and states

Set up a CONTROLS relation between each tab button
and its page, and update the SELECTED property of
the buttons to match their active state.

5 years agostackswitcher: Use the tablist and tab roles
Matthias Clasen [Wed, 14 Oct 2020 04:18:02 +0000 (00:18 -0400)]
stackswitcher: Use the tablist and tab roles

Set the tablist role on the stackswitcher itself, and
the tab role on the buttons. This is another step towards
implementing the tabs pattern for GtkStack.

5 years agoaccessible: Avoid realizing the context prematurely
Matthias Clasen [Wed, 14 Oct 2020 04:16:23 +0000 (00:16 -0400)]
accessible: Avoid realizing the context prematurely

platform change is called from gtk_widget_set_focusable
which is likely to be called early on in init(). We don't
want to create an AT context that early if we can help
it, e.g. since it makes it impossible to override the
accessible-role with a construct property.

5 years agostack: Turn pages into accessibles
Matthias Clasen [Wed, 14 Oct 2020 03:44:50 +0000 (23:44 -0400)]
stack: Turn pages into accessibles

This requires some cleanup to remove assumptions
about accessibles being widgets in the backend,
and some code to navigate the tree with these
extra objects in between widgets.

The accessibles for stack pages have the role
GTK_ACCESSIBLE_ROLE_TAB_PANEL. This is the first
step towards implementing the tabs patterns
as described in the aria authoring guidelines
for GtkStack.

5 years agodocs: Fix a copy-paste error
Matthias Clasen [Wed, 14 Oct 2020 12:23:06 +0000 (08:23 -0400)]
docs: Fix a copy-paste error

5 years agoCosmetics
Matthias Clasen [Wed, 14 Oct 2020 01:27:56 +0000 (21:27 -0400)]
Cosmetics

Fix a few copy-paste errors.

5 years agoCosmetics
Matthias Clasen [Tue, 13 Oct 2020 22:58:25 +0000 (18:58 -0400)]
Cosmetics

Avoid typo-prone repetition of the full interface names.
We have them in the introspection data already.

5 years agodropdown: Use the combox accessible role
Matthias Clasen [Tue, 13 Oct 2020 22:31:08 +0000 (18:31 -0400)]
dropdown: Use the combox accessible role

Its really just a combobox with another name.

5 years agocombobox: Use the combobox accessible role
Matthias Clasen [Tue, 13 Oct 2020 21:53:39 +0000 (17:53 -0400)]
combobox: Use the combobox accessible role

Makes sense.

5 years agoatspi: Implement Selection for GtkFlowBox
Matthias Clasen [Tue, 13 Oct 2020 21:22:05 +0000 (17:22 -0400)]
atspi: Implement Selection for GtkFlowBox

This is a copy of the listbox implementation.

5 years agoflowbox: Update accessible state for children
Matthias Clasen [Tue, 13 Oct 2020 21:22:50 +0000 (17:22 -0400)]
flowbox: Update accessible state for children

Set the SELECTED state to reflect whether the selected
is selected, unselected, or unselectable. This is
enough to make selection changes appear in Accerciser.

While we are at it, also set the multi-selectable
property for the flowbox itself.

5 years agoatspi: Implement Selection for GtkComboBox
Matthias Clasen [Tue, 13 Oct 2020 20:48:09 +0000 (16:48 -0400)]
atspi: Implement Selection for GtkComboBox

This doesn't really work in Accerciser. But then,
neither does the GTK 3 implementation from which
this is copied.

5 years agoRemove excessively spammy debug messages
Matthias Clasen [Tue, 13 Oct 2020 19:19:21 +0000 (15:19 -0400)]
Remove excessively spammy debug messages

Non need to announce the same things for every context
we create, and the path is not really that interesting.
without knowing what it belongs to. I would suggest to
make it visible in the inspector instead, so you can
look it up for the widgets you are interested in.

5 years agoFix compiler warnings
Matthias Clasen [Tue, 13 Oct 2020 19:08:32 +0000 (15:08 -0400)]
Fix compiler warnings

5 years agoRemove some unused code
Matthias Clasen [Tue, 13 Oct 2020 19:08:15 +0000 (15:08 -0400)]
Remove some unused code

5 years agoatspi: Fix a variant parser oversight
Matthias Clasen [Tue, 13 Oct 2020 19:06:52 +0000 (15:06 -0400)]
atspi: Fix a variant parser oversight

When you pass a variant, the format needs an @.
GVariant is not your friend.

5 years agoatspi: Implement Selection for listbox
Matthias Clasen [Tue, 13 Oct 2020 18:19:53 +0000 (14:19 -0400)]
atspi: Implement Selection for listbox

Implement the selection interface for GtkListBox.

This also includes a convenience api for context
addresses: gtk_at_spi_context_to_ref.

5 years agolistbox: Update accessible state for rows
Matthias Clasen [Tue, 13 Oct 2020 16:07:19 +0000 (12:07 -0400)]
listbox: Update accessible state for rows

Set the SELECTED state to reflect whether the row
is selected, unselected, or unselectable. This is
enough to make selection changes appear in Accerciser.

While we are at it, also set the multi-selectable
property for the listbox itself.

5 years agoFix the build
Matthias Clasen [Tue, 13 Oct 2020 15:23:13 +0000 (11:23 -0400)]
Fix the build

I forgot a few casts in a02c50e72fb6f5b.

5 years agoatspi: Fix up the role for password entries
Matthias Clasen [Tue, 13 Oct 2020 14:52:43 +0000 (10:52 -0400)]
atspi: Fix up the role for password entries

We use to set the the 'password text' role for entries with
visibility = FALSE. Nowadays, we have a separate class for
password entries, so fix up the role mapping based on that.

5 years agoatspi: Make text change notification work
Matthias Clasen [Tue, 13 Oct 2020 04:50:19 +0000 (00:50 -0400)]
atspi: Make text change notification work

Make text change notification work for editables, by connecting
to the ::insert-text and ::delete-text signals on the wrapped
GtkText widget, and for GtkTextView by connecting to the
corresponding GtkTextBuffer signals.

This code is more or less directly copied from GtkTextViewAccessible
and GtkEntryAccessible in GTK 3.

5 years agotext: Make editable signals work again
Matthias Clasen [Tue, 13 Oct 2020 04:49:10 +0000 (00:49 -0400)]
text: Make editable signals work again

Since the big editable reorg, GtkText was not emitting
::insert-text and ::delete-text, as is expected of
editables. We want to use those signals for a11y
change notification, so make them work again.

5 years agoatspi: Set placeholder-text attribute
Matthias Clasen [Tue, 13 Oct 2020 03:20:58 +0000 (23:20 -0400)]
atspi: Set placeholder-text attribute

This is how GTK3 passes placeholder-text to orca,
and it works - orca reads it.

5 years agoatspi: Implement EditableText interface for the entry wrappers
Matthias Clasen [Tue, 13 Oct 2020 02:07:18 +0000 (22:07 -0400)]
atspi: Implement EditableText interface for the entry wrappers

Drop the EditableText implementation for GtkText,
and implement it for all the wrapper widgets instead.

5 years agoaccessible: Add some docs
Matthias Clasen [Tue, 13 Oct 2020 01:55:25 +0000 (21:55 -0400)]
accessible: Add some docs

Explain briefly how a11y works for entry wrappers
(since I won't remember a few months from now).

5 years agoatspi: Implement Text interface for the entry wrappers
Matthias Clasen [Tue, 13 Oct 2020 01:18:53 +0000 (21:18 -0400)]
atspi: Implement Text interface for the entry wrappers

Drop the Text implementation for GtkText, and implement
it for all the wrapper widgets instead.

5 years agospinbutton: Implement GtkAccessible
Matthias Clasen [Tue, 13 Oct 2020 01:34:16 +0000 (21:34 -0400)]
spinbutton: Implement GtkAccessible

This copies what was done for GtkEntry: get
the focused state from the GtkText within.

We also add a private getter for the text widget,
which was missing here.

5 years agopasswordentry: Implement GtkAccessible
Matthias Clasen [Tue, 13 Oct 2020 01:33:55 +0000 (21:33 -0400)]
passwordentry: Implement GtkAccessible

This copies what was done for GtkEntry: get
the focused state from the GtkText within.

5 years agosearchentry: Implement GtkAccessible
Matthias Clasen [Tue, 13 Oct 2020 01:17:31 +0000 (21:17 -0400)]
searchentry: Implement GtkAccessible

This copies what was done for GtkEntry: get
the focused state from the GtkText within.

5 years agoentry: Implement GtkAccessible
Matthias Clasen [Tue, 13 Oct 2020 00:18:48 +0000 (20:18 -0400)]
entry: Implement GtkAccessible

Override the get_platform_state vfunc to get
the focused state from the GtkText widget within.

5 years agotext: Ignore text widgets for a11y
Matthias Clasen [Tue, 13 Oct 2020 00:19:29 +0000 (20:19 -0400)]
text: Ignore text widgets for a11y

We want to implement the Text interface on the
wrapper entries.

5 years agoatspi: Use gtk_accessible_get_platform_state
Matthias Clasen [Mon, 12 Oct 2020 23:01:57 +0000 (19:01 -0400)]
atspi: Use gtk_accessible_get_platform_state

5 years agoaccessible: Add gtk_accessible_get_platform_state
Matthias Clasen [Mon, 12 Oct 2020 23:00:03 +0000 (19:00 -0400)]
accessible: Add gtk_accessible_get_platform_state

As a companion to go with the platform_change api,
add a gtk_accessible_get_platform_state() function
that can be used by backends to get the platform
state.

This is in preparation for making entries inherit
their focus states from the text widget within.

5 years agoatspi: Use gtk_accessible_should_present
Matthias Clasen [Mon, 12 Oct 2020 20:39:35 +0000 (16:39 -0400)]
atspi: Use gtk_accessible_should_present

Replace explicit visibility check by this
more general method of determining whether
an accessible should be presented to the
a11y layer.

5 years agoaccessible: Add a way to hide accessibles
Matthias Clasen [Mon, 12 Oct 2020 20:22:52 +0000 (16:22 -0400)]
accessible: Add a way to hide accessibles

Similar to gtk_widget_should_layout(), add a
gtk_accessible_should_present() function that backends can
use to determine whether an accessible should be presented
or not.

Ways to make a widget not presented in a11y:
- hide the widget
- set its role to NONE
- make it have a NULL AT context

We will use this in future to hide the GtkText inside
an entry, since the Text implementation will be done
by the wrapper.

5 years agoCosmetics
Matthias Clasen [Mon, 12 Oct 2020 20:12:14 +0000 (16:12 -0400)]
Cosmetics

5 years agoatspi: Treat all entries the same for collecting state
Matthias Clasen [Tue, 13 Oct 2020 01:32:37 +0000 (21:32 -0400)]
atspi: Treat all entries the same for collecting state

We are determining editable state based on the
accessible role (although we could make it platform
state now), so cover all the roles that we use for
entry wrappers.

5 years agoatspi: Fix collecting states
Matthias Clasen [Tue, 13 Oct 2020 01:16:03 +0000 (21:16 -0400)]
atspi: Fix collecting states

This is somewhat embarrassing.

5 years agoFix the build
Matthias Clasen [Mon, 12 Oct 2020 20:40:34 +0000 (16:40 -0400)]
Fix the build

5 years agoatspi: D-Bus methods return tuples
Matthias Clasen [Mon, 12 Oct 2020 19:50:36 +0000 (15:50 -0400)]
atspi: D-Bus methods return tuples

I've learned this the hard way: When returning a
value from a D-Bus call, the variant construct must
*always* be g_variant_new ("(...)"...

5 years agoDon't unref a floating variant
Matthias Clasen [Mon, 12 Oct 2020 19:04:50 +0000 (15:04 -0400)]
Don't unref a floating variant

It gets consumed somewhere along the way.

5 years agoatspi: Unregister objects on the bus
Matthias Clasen [Mon, 12 Oct 2020 18:41:38 +0000 (14:41 -0400)]
atspi: Unregister objects on the bus

When a widget is going away, we need to remove
the context from the bus, or else ATs might have
the idea to call methods on them, leading to badness.

5 years agoatspi: Emit property changes for focus
Matthias Clasen [Mon, 12 Oct 2020 18:11:30 +0000 (14:11 -0400)]
atspi: Emit property changes for focus

With this orca, actually speaks \o/.  Sadly, it only
says 'gtk modelbutton widget' so far, but its a start.

5 years agoatspi: Cosmetics
Matthias Clasen [Mon, 12 Oct 2020 17:15:05 +0000 (13:15 -0400)]
atspi: Cosmetics

Use simple wrappers instead of opencoding bit twiddling
all over the place.

5 years agowidget: Notify a11y of focus changes
Matthias Clasen [Mon, 12 Oct 2020 17:13:00 +0000 (13:13 -0400)]
widget: Notify a11y of focus changes

This is using the new 'platform changes' mechanism
to tell the a11y backends when focus changes.

5 years agoa11y: Pass on platform changes
Matthias Clasen [Mon, 12 Oct 2020 17:05:43 +0000 (13:05 -0400)]
a11y: Pass on platform changes

Add an enum for 'platform changes' to the at context
change notification mechanism. This will let us pass
along things that ARIA considers 'platform state' such
as focus or editability. The difference between the
platform state and other ARIA states is that we don't
keep the platform state separately in the at context
- backends are expected to just query the widgets.

This is just about avoiding notify listeners for
change notification.

5 years agoatspi: Be more careful about indexes
Matthias Clasen [Mon, 12 Oct 2020 13:50:57 +0000 (09:50 -0400)]
atspi: Be more careful about indexes

Don't return a number for IndexInParent when we
don't have one.

5 years agoatspi: Set some more atspi states
Matthias Clasen [Mon, 12 Oct 2020 04:21:14 +0000 (00:21 -0400)]
atspi: Set some more atspi states

Pass on more of the states that are represented
as properties in aria: modal, multi-line, orientation.

5 years agoPass orientation property to accessible
Matthias Clasen [Mon, 12 Oct 2020 04:19:55 +0000 (00:19 -0400)]
Pass orientation property to accessible

We should set the accessible properties we have,
where they make sense. So set orientation, if the
widget is orientable.

5 years agowip: Emit StateChanged signals
Matthias Clasen [Mon, 12 Oct 2020 00:22:06 +0000 (20:22 -0400)]
wip: Emit StateChanged signals

This is not fully baked, but it is enough to make accerciser
notice when a text entry goes from editable to not editable.

5 years agoatspi: Derive readonly state from aria properties
Matthias Clasen [Mon, 12 Oct 2020 03:35:34 +0000 (23:35 -0400)]
atspi: Derive readonly state from aria properties

We can use the read-only property, together with the
accessible role, to determine whether to set editable
and read-only states for at-spi. This lets us avoid
directly poking at the widgets.

5 years agotext: Set the readonly accessible property
Matthias Clasen [Mon, 12 Oct 2020 03:34:36 +0000 (23:34 -0400)]
text: Set the readonly accessible property

This mirrors what we already do for GtkTextView.

5 years agoatspi: Set editable state
Matthias Clasen [Sun, 11 Oct 2020 22:59:22 +0000 (18:59 -0400)]
atspi: Set editable state

ATs look at not just the implemented interfaces, but
also the states to decide what to do. It turns out that
the EditableText interface is only used by accerciser
if the editable state is set. So set it.

5 years agoatspi: Implement EditableText interface
Matthias Clasen [Sun, 11 Oct 2020 20:39:26 +0000 (16:39 -0400)]
atspi: Implement EditableText interface

Implement EditableText for GtkText and GtkTextView.

5 years agoatspi: Break out the Value implementation
Matthias Clasen [Sun, 11 Oct 2020 20:18:56 +0000 (16:18 -0400)]
atspi: Break out the Value implementation

This isn't necessarily very big, but it keeps
the widget checks out of gtkatspicontext.c, and
it is a nice pattern.

5 years agoatspi: Break out the Text implementations
Matthias Clasen [Sun, 11 Oct 2020 20:03:19 +0000 (16:03 -0400)]
atspi: Break out the Text implementations

Move the implementation of the Text interface
to its own source file, and split it up along
widget lines, to avoid it becoming too messy.

5 years agoscalebutton: Set accessible value properties
Matthias Clasen [Sun, 11 Oct 2020 15:46:06 +0000 (11:46 -0400)]
scalebutton: Set accessible value properties

This is what we did in GTK 3.

5 years agopaned: Set accessible value properties
Matthias Clasen [Sun, 11 Oct 2020 15:30:54 +0000 (11:30 -0400)]
paned: Set accessible value properties

This is what we did in GTK 3.

5 years agoSimplify GetInterfaces handling
Matthias Clasen [Sun, 11 Oct 2020 15:06:29 +0000 (11:06 -0400)]
Simplify GetInterfaces handling

It is error prone to keep the same conditions in sync
in two places. Instead, just assemble the list of interfaces
as we register objects, and use when GetInterfaces is called.

5 years agoatspi: Implement Value for more widgets
Matthias Clasen [Sun, 11 Oct 2020 14:33:05 +0000 (10:33 -0400)]
atspi: Implement Value for more widgets

Apply the Value implementation to the widgets where
we had one in GTK 3: GtkLevelBar, GtkRange, GtkScaleButton,
GtkSpinButton, GtkPaned, GtkProgressBar. To make these
work, the widgets need to set the accessible value properties.

5 years agoatspi: Implement Value interface for ranges
Matthias Clasen [Sun, 11 Oct 2020 04:27:55 +0000 (00:27 -0400)]
atspi: Implement Value interface for ranges

5 years agoatspi: Implement Text interface for text views
Matthias Clasen [Sun, 11 Oct 2020 03:48:49 +0000 (23:48 -0400)]
atspi: Implement Text interface for text views

With this, all relevant widgets support the
Text interface.

5 years agoatspi: Add textview utilities
Matthias Clasen [Sun, 11 Oct 2020 03:47:34 +0000 (23:47 -0400)]
atspi: Add textview utilities

These are very similar to the pango utilities,
and are copying code from the textview accessible
implementation in GTK 3.

5 years agoatspi: Export more pango utils
Matthias Clasen [Sun, 11 Oct 2020 03:50:02 +0000 (23:50 -0400)]
atspi: Export more pango utils

We are going to reuse some of the code that does
the pango -> atspi attribute conversion for text
tags.

5 years agoatspi: Implement text for GtkText widgets too
Matthias Clasen [Sun, 11 Oct 2020 00:38:24 +0000 (20:38 -0400)]
atspi: Implement text for GtkText widgets too

There is some open question here whether the interface
should be implemented on the outer or the inner widget
of the entry-text pairs. For now, our hand is forced,
since only GtkText provides access to the layout that
we need for implementing many of the interface methods.

5 years agoatspi: Implement Text interface for labels
Matthias Clasen [Sat, 10 Oct 2020 03:35:00 +0000 (23:35 -0400)]
atspi: Implement Text interface for labels

This is a not-quite-complete implementation of the
Text interface for GtkLabel. The missing parts are
anything around extents and positions, as well as
the ScrollSubstring apis.

5 years agoatspi: Add pango utilities
Matthias Clasen [Sat, 10 Oct 2020 17:42:07 +0000 (13:42 -0400)]
atspi: Add pango utilities

This code is more or less a direct copy of what
we had in gtkpango.c in 3.x.

5 years agoatspicontext: Fix GetIndexInParent for toplevels
Matthias Clasen [Sat, 10 Oct 2020 16:22:16 +0000 (12:22 -0400)]
atspicontext: Fix GetIndexInParent for toplevels

For toplevels, we need to return the index in the
list of toplevels, since that is what GtkAtspiRoot
is using.

5 years agoatcontext: labelled-by has a reference list
Matthias Clasen [Sat, 10 Oct 2020 16:12:03 +0000 (12:12 -0400)]
atcontext: labelled-by has a reference list

This is unclear - our docs state that all the
relations have value type reference, but in fact
they all have value type reference list.

5 years agoatspicontext: Implement GetRelationSet
Matthias Clasen [Sat, 10 Oct 2020 14:43:59 +0000 (10:43 -0400)]
atspicontext: Implement GetRelationSet

This translates relations as far as the match.

I'm not sure yet what we can do about the fact that
atspi expects relations to be bidirectional (ie have
label-for *and* labelled-by) while aria has only one
direction.

5 years agoatspiroot: Stub out GetRelationSet
Matthias Clasen [Sat, 10 Oct 2020 14:43:07 +0000 (10:43 -0400)]
atspiroot: Stub out GetRelationSet

This needs to be fully implemented, for now sending
an empty relation set back prevents accerciser from
getting hung up.

5 years agoatspi: Add the AtspiRelationType enum
Matthias Clasen [Sat, 10 Oct 2020 16:24:25 +0000 (12:24 -0400)]
atspi: Add the AtspiRelationType enum

This is what we need to map the aria relation
types to.

5 years agoMove atspi enums to gtkatspiprivate.h
Matthias Clasen [Sat, 10 Oct 2020 15:16:47 +0000 (11:16 -0400)]
Move atspi enums to gtkatspiprivate.h

5 years agoAdd a GetInterfaces method
Matthias Clasen [Sat, 10 Oct 2020 03:32:36 +0000 (23:32 -0400)]
Add a GetInterfaces method

It turns out that accerciser depends on this undocumented
method that is not in the xml at all, otherwise interface
sections in the accerciser ui never get enabled.

5 years agoDon't pass NULL to g_variant_new_string
Matthias Clasen [Sat, 10 Oct 2020 14:06:50 +0000 (10:06 -0400)]
Don't pass NULL to g_variant_new_string

That does not work.

5 years agoatspi utils: Fix an oversight
Matthias Clasen [Sat, 10 Oct 2020 13:23:49 +0000 (09:23 -0400)]
atspi utils: Fix an oversight

gtk_accessible_role_to_atspi_role must always return
an atspi role. The fallback was returning an aria
role.

5 years agoFixup: Add a forgotten #pragma once
Matthias Clasen [Sat, 10 Oct 2020 17:43:48 +0000 (13:43 -0400)]
Fixup: Add a forgotten #pragma once

5 years agoa11y: Convenience API for referencing ATSPI root node
Emmanuele Bassi [Sat, 10 Oct 2020 12:23:21 +0000 (13:23 +0100)]
a11y: Convenience API for referencing ATSPI root node

We turn the root node into a reference fairly often, so it's worth it to
have a utility function that does this for us.

5 years agoa11y: Add utility function for null refs
Emmanuele Bassi [Sat, 10 Oct 2020 11:51:03 +0000 (12:51 +0100)]
a11y: Add utility function for null refs

ATSPI was written for CORBA, which allows passing around "nil"
as valid object references.

5 years agoatspicontext: Implement GetState
Matthias Clasen [Sat, 10 Oct 2020 02:00:48 +0000 (22:00 -0400)]
atspicontext: Implement GetState

Translate the aria states to at-spi's interpretation
of atk states.

5 years agoatspiroot: Fix GetState implementation
Matthias Clasen [Sat, 10 Oct 2020 01:59:57 +0000 (21:59 -0400)]
atspiroot: Fix GetState implementation

When the GetState signature says 'au', it actually
means a bitset that is sent as a pair of 32bit integers.

5 years agoatspiroot: Implement GetIndexInParent
Matthias Clasen [Sat, 10 Oct 2020 00:25:38 +0000 (20:25 -0400)]
atspiroot: Implement GetIndexInParent

Just for good measure

5 years agoatspicontext: Implement GetIndexInParent
Matthias Clasen [Sat, 10 Oct 2020 00:24:52 +0000 (20:24 -0400)]
atspicontext: Implement GetIndexInParent

This is needed for ATs to take our tree seriously.

5 years agoatspicontext: Implement more accessible api
Matthias Clasen [Fri, 9 Oct 2020 23:20:24 +0000 (19:20 -0400)]
atspicontext: Implement more accessible api

Implement GetChildAtIndex, GetChildren and ChildCount.

5 years agoatspiroot: Implement GetChildren
Matthias Clasen [Fri, 9 Oct 2020 22:33:28 +0000 (18:33 -0400)]
atspiroot: Implement GetChildren

No surprises here.

5 years agoatspiroot: Don't leak references
Matthias Clasen [Fri, 9 Oct 2020 22:21:15 +0000 (18:21 -0400)]
atspiroot: Don't leak references

The reffing getter trap, lurking behind g_list_model_get_item().

5 years agoatspiroot: Implement GetLocale
Matthias Clasen [Fri, 9 Oct 2020 19:16:43 +0000 (15:16 -0400)]
atspiroot: Implement GetLocale

5 years agoatspicontext: Print out the a11y bus address
Matthias Clasen [Fri, 9 Oct 2020 19:15:45 +0000 (15:15 -0400)]
atspicontext: Print out the a11y bus address

Make our debug spew useful: Having the bus address
makes it easy to jump on the a11y bus to look around
with dbus tools.

5 years agoa11y: Localise the role name of the root node
Emmanuele Bassi [Sat, 10 Oct 2020 11:55:54 +0000 (12:55 +0100)]
a11y: Localise the role name of the root node

5 years agoa11y: Register the Accessible interface on all AtSpiContext instances
Emmanuele Bassi [Fri, 9 Oct 2020 21:46:15 +0000 (22:46 +0100)]
a11y: Register the Accessible interface on all AtSpiContext instances

This is not a complement implementation.